<!DOCTYPE html>
<html>
<head>
<include file="Include:meta" />
<title>运营周报-目的地运营集团数据管理平台</title>
<include file="Include:style" />
</head>
<body>
<include file="Include:header" />
<include file="Include:left" />
<div id="main">
	<div class="crumbs">
		<div class="crumbs-text"><if condition="$project['info_id'] neq NULL">商务跟进</if>项目 > [{$project['project_num']}]{$project['project_name']} > 运营周报</div>
		<if condition="((((get_permission($qs,NULL,3)) and ($project['add_uid'] eq $login_id)) or (get_permission($qs,NULL,2) and (in_array($project['center_id'],$manage_id))) or (get_permission($qs,NULL,1))) or ($project['director_uid'] eq $login_id) or ($project['manager_uid'] eq $login_id) or is_project($project['id'],52)) and ($project['status'] eq 1)">
		<div class="right">
			<a href="__APP__/Project/project_operate_add/pid/{$project['id']}" class="btn left ml5">添加运营周报</a>
		</div>
		</if>
	</div>
	<div id="content">
		<include file="Include:project_header" />
		<div class="table-scrollx">
			<table class="table table-bordered table-hover">
				<tr class="table-header fixed-table-header">
					<td width="200">周期</td>
					<td width="100">附件</td>
					<td width="84">负责人(日期)</td>
					<td width="84">批复人(日期)</td>
					<if condition="((((get_permission($qs,NULL,3)) and ($project['add_uid'] eq $login_id)) or (get_permission($qs,NULL,2) and (in_array($project['center_id'],$manage_id))) or (get_permission($qs,NULL,1))) or ($project['director_uid'] eq $login_id) or ($project['manager_uid'] eq $login_id) or is_project($project['id'],52)) and ($project['status'] eq 1)">
					<td width="50">管理</td>
					</if>
				</tr>
				<if condition="$result eq NULL">
					<tr>
						<td <if condition="((((get_permission($qs,NULL,3)) and ($project['add_uid'] eq $login_id)) or (get_permission($qs,NULL,2) and (in_array($project['center_id'],$manage_id))) or (get_permission($qs,NULL,1))) or ($project['director_uid'] eq $login_id) or ($project['manager_uid'] eq $login_id) or is_project($project['id'],52)) and ($project['status'] eq 1)">colspan="5"<else/>colspan="4"</if> class="text-center">暂无相关内容</td>
					</tr>
				</if>
				<foreach name="result" item="vo">
				<tr>
					<td><a href="__APP__/Project/project_operate_detail/id/{$vo['id']}/pid/{$project['id']}" target="_blank">{$vo['year']}年&nbsp;{$vo['week_detail']}</a></td>
					<td><if condition="$vo['file_url'] neq NULL">{$vo['file_name']}<a href="{$vo['file_url']}" class="ml5" data-toggle="tooltip" data-placement="right" title="下载"><i class="glyphicon glyphicon-download-alt"></i></a></if></td>
					<td>{$vo['add_user']}({$vo['add_date']|substr=0,10})</td>
					<td><if condition="$vo['audit_user'] neq NULL">{$vo['audit_user']}({$vo['audit_date']|substr=0,10})</if></td>
					<if condition="((((get_permission($qs,NULL,3)) and ($project['add_uid'] eq $login_id)) or (get_permission($qs,NULL,2) and (in_array($project['center_id'],$manage_id))) or (get_permission($qs,NULL,1))) or ($project['director_uid'] eq $login_id) or ($project['manager_uid'] eq $login_id) or is_project($project['id'],52)) and ($project['status'] eq 1)">
					<td class="nowrap">
						<if condition="((((get_permission($qs,NULL,3)) and ($project['add_uid'] eq $login_id)) or (get_permission($qs,NULL,2) and (in_array($project['center_id'],$manage_id))) or (get_permission($qs,NULL,1))) or ($project['director_uid'] eq $login_id) or ($project['manager_uid'] eq $login_id) or (is_project($project['id'],52) and $vo['add_uid'] eq $login_id)) and ($project['status'] eq 1)">
							<if condition="$vo['status'] eq -1">
								<a href="javascript:;" mid="{$vo['id']}" action="audit" data-toggle="tooltip" data-placement="left" title="提交" class="audit"><i class="glyphicon glyphicon-ok"></i></a>
								<a href="__APP__/Project/project_operate_edit/id/{$vo['id']}/pid/{$project['id']}" data-toggle="tooltip" data-placement="left" title="编辑" class="ml5"><i class="glyphicon glyphicon-edit"></i></a>
								<a href="javascript:;" mid="{$vo['id']}" action="delete" data-toggle="tooltip" data-placement="left" title="删除" class="delete ml5"><i class="glyphicon glyphicon-trash"></i></a>
							<elseif condition="($vo['status'] eq 1) and ($vo['audit_user'] eq NULL)"/>
								<a href="javascript:;" mid="{$vo['id']}" action="remove" data-toggle="tooltip" data-placement="left" title="放弃提交" class="remove"><i class="glyphicon glyphicon-remove"></i></a>
							</if>
						</if>
					</td>
					</if>
				</tr>
				</foreach>
			</table>
		</div>
		<div class="pages">{$page}</div>
	</div>
</div>
<include file="Include:javascript" />
<script type="text/javascript">
$(function(){
	//删除项目过程文件
	$(".delete").ajaxModal({"title_text":"确认提示框","body_text":"您确定要删除吗？","url":"__APP__/Project/project_operate_ajax","data":{"id":"mid","action":"action"}});
	$('.audit').on("click",function(){
		var mid = $(this).attr("mid");
		$.ajax({
			cache:true,
			type:"POST",
			dataType:"json",
			url:"__APP__/Project/project_operate_ajax",
			data:{"id":mid,"action":"audit"},
			success:function(data){
				success_pop(data['status'],data['msg']);
			}
		});
	});
	$('.remove').on("click",function(){
		var mid = $(this).attr("mid");
		$.ajax({
			cache:true,
			type:"POST",
			dataType:"json",
			url:"__APP__/Project/project_operate_ajax",
			data:{"id":mid,"action":"remove"},
			success:function(data){
				success_pop(data['status'],data['msg']);
			}
		});
	});
})
</script>
</body>
</html>